package com.xn.monitor.web.controller;


import com.xn.monitor.web.entity.Environment;
import com.xn.monitor.web.service.MonitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by yangshoujun on 2017/6/25 上午11:29.
 */
@Controller
@RequestMapping("/monitor")
public class MonitorController {

    @Autowired
    private MonitorService monitorService;

    @ResponseBody
    @RequestMapping("/all")
    public Object all() {
        List<Environment> list = monitorService.getEnviroments();
        return list;
    }
}
